.class public Lcom/uucun/adsdk/c/c;
.super Ljava/lang/Thread;


# instance fields
.field public a:Ljava/lang/String;

.field private b:Lorg/json/JSONObject;

.field private c:Ljava/lang/String;

.field private d:Lcom/uucun/adsdk/c/m;

.field private e:Z

.field private f:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Lorg/json/JSONObject;Z)V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    const-class v0, Lcom/uucun/adsdk/c/c;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/c/c;->a:Ljava/lang/String;

    iput-object v1, p0, Lcom/uucun/adsdk/c/c;->b:Lorg/json/JSONObject;

    iput-object v1, p0, Lcom/uucun/adsdk/c/c;->c:Ljava/lang/String;

    iput-object v1, p0, Lcom/uucun/adsdk/c/c;->d:Lcom/uucun/adsdk/c/m;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/uucun/adsdk/c/c;->e:Z

    iput-object v1, p0, Lcom/uucun/adsdk/c/c;->f:Landroid/content/Context;

    iput-object p2, p0, Lcom/uucun/adsdk/c/c;->c:Ljava/lang/String;

    iput-object p3, p0, Lcom/uucun/adsdk/c/c;->b:Lorg/json/JSONObject;

    new-instance v0, Lcom/uucun/adsdk/c/m;

    invoke-direct {v0, p1}, Lcom/uucun/adsdk/c/m;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/uucun/adsdk/c/c;->d:Lcom/uucun/adsdk/c/m;

    iput-boolean p4, p0, Lcom/uucun/adsdk/c/c;->e:Z

    iput-object p1, p0, Lcom/uucun/adsdk/c/c;->f:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 5

    iget-boolean v0, p0, Lcom/uucun/adsdk/c/c;->e:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/uucun/adsdk/c/c;->b:Lorg/json/JSONObject;

    iget-object v1, p0, Lcom/uucun/adsdk/c/c;->f:Landroid/content/Context;

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/c;->a(Lorg/json/JSONObject;Landroid/content/Context;)V

    :cond_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    :try_start_0
    iget-object v2, p0, Lcom/uucun/adsdk/c/c;->b:Lorg/json/JSONObject;

    const-string v3, "app_key"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/uucun/adsdk/c/c;->b:Lorg/json/JSONObject;

    const-string v4, "imei"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    if-eqz v2, :cond_1

    invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_1

    if-eqz v3, :cond_1

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_2

    :cond_1
    :goto_0
    return-void

    :cond_2
    iget-object v2, p0, Lcom/uucun/adsdk/c/c;->d:Lcom/uucun/adsdk/c/m;

    iget-object v3, p0, Lcom/uucun/adsdk/c/c;->c:Ljava/lang/String;

    iget-object v4, p0, Lcom/uucun/adsdk/c/c;->b:Lorg/json/JSONObject;

    invoke-virtual {v2, v3, v4}, Lcom/uucun/adsdk/c/m;->a(Ljava/lang/String;Lorg/json/JSONObject;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/h;->a(J)F

    move-result v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " s"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/uucun/adsdk/c/c;->a:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Connection Time :"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, " "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v2, p0, Lcom/uucun/adsdk/c/c;->c:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/uucun/adsdk/b/h;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    :catch_0
    move-exception v2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v4, p0, Lcom/uucun/adsdk/c/c;->a:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " DataSendThread->"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v4, ""

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v3, v2}, Lcom/uucun/adsdk/b/h;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1
.end method
